import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Author: Daniel Michalski
 * Date: 26.02.13
 */

public class Test {
    public static void main(String[] args) {
        String str;

        try (InputStreamReader in = new InputStreamReader(System.in);
             BufferedReader br = new BufferedReader(in)) {
            do {
                System.out.println("Podaj ciąg tekstowy, 'koniec', aby zakończyć");
                str = br.readLine();
                if (!str.equals("koniec"))
                    System.out.println(str);
            } while (!str.equals("koniec"));
        } catch (IOException ex) {
            System.out.println("Błąd wejścia- wyjścia");
        }


}
}
